<template>
    <div class="ProductParam" :class="scrollHeight >= 140 ? 'fixed' : ''">
        <div class="left">红米Note 7</div>
        <div class="right">
            <span>概述</span>
            <span>参数</span>
            <span>用户评价</span>
        </div>
    </div>
</template>

<script>
export default {
    name: "ProductParam",
    props: {
        scrollHeight: {
            type: Number,
            default: () => {
                return 0;
            },
        },
    },
};
</script>

<style lang="less">
.ProductParam {
    display: flex;
    background-color: #fff;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px 0 20px;
    height: 50px;
    box-sizing: border-box;
    .left {
        font-size: 16px;
        font-weight: bold;
    }
    .right {
        span {
            font-size: 14px;
            color: #666;
            padding: 0 10px;
            border-right: 1px solid #666;
        }
        span:last-child {
            border: none;
        }
    }
}
.fixed {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9;
    box-shadow: 0px 5px 10px #333;
}
</style>